/////////////////////////////////////////////////////////////////////////
//
// Amuse Engine SDK - core/threads
// Copyright (c) 2014.  All Rights Reserved
//
// File:		AEThreadWorkItem.h
// Author:		Gianluca Belardelli
// Date:		12/03/2014
//
/////////////////////////////////////////////////////////////////////////
#ifndef _AETHREADWORKITEM_H_
#define _AETHREADWORKITEM_H_

class AEThreadWorkItem
{
// Members
public:
	enum AEWorkItemStatus
	{
		Undefined		= -1,
		Executing,
		Completed
	};

protected:
	AEWorkItemStatus	m_wiStatus;

// Methods
public:
	AEThreadWorkItem( void ) : m_wiStatus( Undefined ) {}

	virtual void Process( void ) = 0;
	virtual AEBOOL32 IsDynamicallyAllocated( void ) = 0;

	virtual void SetStatus( AEWorkItemStatus wiStatus ) { m_wiStatus = wiStatus; }
	AEWorkItemStatus GetCurrentStatus( void ) { return m_wiStatus; }
};

#endif // _AETHREADWORKITEM_H_
